﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Spaanjaars.ContactManager.Infrastructure.Validation;
using Spaanjaars.ContactManager.Model;

namespace Spaanjaars.ContactManager.Tests.Domain
{
    [TestFixture]
    public class When_creating_an_address
    {
        [Test]
        [ExpectedException(typeof(InvalidDomainObjectException))]
        public void An_exception_will_be_thrown_if_an_address_is_created_with_an_empty_street()
        {
            var address = new Address("23", string.Empty, "PO7788", "London", "UK");
        }

        [Test]
        [ExpectedException(typeof(InvalidDomainObjectException))]
        public void An_exception_will_be_thrown_if_an_address_is_created_with_an_empty_house_number()
        {
            var address = new Address(string.Empty, "baker street", "PO7788", "London", "UK");
        }
    }
}
